﻿Module AdjustFormModule
#Region "显示信息对话框"
    Public strMsgTitle As String = "永胜信息管理系统"

    Public Sub ShowMessageBoxModule(ByVal strContent As String)
        System.Windows.Forms.MessageBox.Show(strContent, strMsgTitle)
    End Sub

    'A-2009-09-25
    Public Sub ShowMessageBoxModule(ByVal frm As Windows.Forms.Control, ByVal strContent As String)
        System.Windows.Forms.MessageBox.Show(frm, strContent, strMsgTitle)
    End Sub
    'A-2009-09-25
    ''' <summary>
    ''' O代表取消 1代表删除
    ''' </summary>
    ''' <param name="strContent"></param>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Public Function ShowMessageResultModule(ByVal strContent As String) As Windows.Forms.DialogResult
        ShowMessageResultModule = Windows.Forms.DialogResult.No
        If System.Windows.Forms.MessageBox.Show(strContent, strMsgTitle, Windows.Forms.MessageBoxButtons.YesNo, Windows.Forms.MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
            ShowMessageResultModule = Windows.Forms.DialogResult.Yes
        End If
    End Function
    'A-2009-09-25
    Public Function ShowMessageResultModule(ByVal frm As Windows.Forms.Control, ByVal strContent As String) As Windows.Forms.DialogResult
        ShowMessageResultModule = Windows.Forms.DialogResult.No
        If System.Windows.Forms.MessageBox.Show(frm, strContent, strMsgTitle, Windows.Forms.MessageBoxButtons.YesNo, Windows.Forms.MessageBoxIcon.Question) = Windows.Forms.DialogResult.Yes Then
            ShowMessageResultModule = Windows.Forms.DialogResult.Yes
        End If
    End Function
    'A-2009-09-25
    Public Function GetRandom(ByVal iMin As Integer, ByVal iMax As Integer)
        Dim rn As Random = New Random(System.DateTime.Now.Millisecond)
        Return rn.Next(iMin, iMax)
    End Function

    Public Sub CopyFoler(ByVal strSourcePath As String, ByVal strTargetPath As String)
        Try
            Dim obj As New IWshRuntimeLibrary.FileSystemObject
            obj.CopyFolder(strSourcePath, strTargetPath, True)
        Catch ex As Exception

        End Try

    End Sub

    Public Function GetLocalName(ByVal strContent) As String()
        GetLocalName = Nothing
        Dim strPattern As String = "Dim[\s\s]+?as"
    End Function

#End Region
End Module
